
%{
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "operations.h"
#include "y.tab.h"
%}

mark "#"
div  "/"
mul "*"
plus "+"
minus "-"
number \-?[0-9]+
whitespace [' ''\t']+
end "\n"

%%

{end} {
        return 0;
      }
{mark} {
         yylval.string = strdup(yytext);
         return MARK;
       }
{div} {
         yylval.string = strdup(yytext);
         return DIV;
       }
{mul} {
         yylval.string = strdup(yytext);
         return MUL;
       }
{plus} {
         yylval.string = strdup(yytext);
         return PLUS;
       }
{minus} {
         yylval.string = strdup(yytext);
         return MINUS;
       }
{number} {
         yylval.number = atoi(yytext);
         return NUMBER;
         }
{whitespace} ;

